package org.eiahe.hr.salary.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.eiahe.hr.salary.domain.BonusPayment;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 奖金导入视图对象，用于Excel导入
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BonusPayment.class)
public class BonusImportVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 工号
     */
    @ExcelProperty(value = "工号")
    @NotBlank(message = "工号不能为空")
    private String employeeNo;

    /**
     * 员工姓名
     */
    @ExcelProperty(value = "员工姓名")
    @NotBlank(message = "员工姓名不能为空")
    private String employeeName;

    /**
     * 奖金类型
     */
    @ExcelProperty(value = "奖金类型")
    @NotBlank(message = "奖金类型不能为空")
    private String bonusType;

    /**
     * 奖金金额
     */
    @ExcelProperty(value = "奖金金额")
    @NotNull(message = "奖金金额不能为空")
    private BigDecimal bonusAmount;

    /**
     * 发放时间
     */
    @ExcelProperty(value = "发放时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "发放时间不能为空")
    private Date paymentTime;

    /**
     * 核算规则
     */
    @ExcelProperty(value = "核算规则")
    private String calculationRule;

    /**
     * 核算人
     */
    @ExcelProperty(value = "核算人")
    private String calculator;

    /**
     * 核算时间
     */
    @ExcelProperty(value = "核算时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date calculationTime;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;
}